function runProject(){ 
    #进入项目        
    cd $1
    #mvn clean package
    #运行 jar
    cd 
    cmd='java -jar ./target/'$1'-0.0.1-SNAPSHOT.jar '$2''
    nohup $cmd &
}

(runProject 'euraka' '--spring-profiles-active=peer1')
(runProject 'euraka' '--spring-profiles-active=peer2')

# '--spring-profiles-active=peer1'
# cd 'euraka'
#mvn clean package

echo 'finish'